package service.impl;

import POJO.Books;
import mapper.BooksMapper;
import org.springframework.stereotype.Service;
import service.BooksService;

import javax.annotation.Resource;
import java.util.List;

/**
 * Created by 79430 on 2018/1/4.
 */
@Service("booksService")
public class BooksServiceImpl implements BooksService {

    @Resource
    private BooksMapper booksMapper;




    public List<Books> selAll(Integer a, String b, int currPageNo, int pageSize) {
        return booksMapper.selAll(a,b,currPageNo,pageSize);
    }


    public int add(Books book) {
        return booksMapper.add(book);
    }


    public int count(Integer a,String b) {
        int count=booksMapper.count(a,b);
        return count;
    }


    public Books selbyId(Integer bookId) {
        return booksMapper.selbyId(bookId);
    }


    public int updateById(Books books) {
        return booksMapper.updateById(books);
    }


    public int deleteById(Books books) {
        return booksMapper.deleteById(books);
    }
}
